cmake_minimum_required(VERSION 2.8)
project(TEST)

set(GOOGLETEST C:/chenchang/dev/googletest)

include_directories(${GOOGLETEST}/googletest/include
    ${GOOGLETEST}/googlemock/include)

if (CMAKE_CL_64)
    set(ARCH X64)
else (CMAKE_CL_64)
    set(ARCH X86)
endif (CMAKE_CL_64)

link_libraries(${GOOGLETEST}/bld/${ARCH}/googlemock/$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>/gmock.lib
    ${GOOGLETEST}/bld/${ARCH}/googlemock/$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>/gmock_main.lib
    ${GOOGLETEST}/bld/${ARCH}/googlemock/gtest/$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>/gtest.lib
    ${GOOGLETEST}/bld/${ARCH}/googlemock/gtest/$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>/gtest_main.lib)

add_executable(main main.cpp)
set_target_properties(main PROPERTIES
    COMPILE_OPTIONS /MT$<$<CONFIG:Debug>:d>
    )
